package com.turbo.cloud.ods.web.webservice;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.turbo.cloud.core.api.R;
import com.turbo.cloud.core.api.Result;
import com.turbo.cloud.core.base.PageQuery;
import com.turbo.cloud.ods.web.logic.OdsReportRecordLogic;
import com.turbo.cloud.ods.web.model.OdsReportRecordQo;
import com.turbo.cloud.ods.web.model.OdsReportRecordVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 报表导出记录表 前端控制器
 * </p>
 *
 * @author zhangluning
 * @since 2024-08-07
 */
@RequiredArgsConstructor
@RestController
public class OdsReportRecordController {

    final OdsReportRecordLogic odsReportRecordLogic;

    /**
     * 查询报表配置分页列表
     *
     * @return Result
     */
    @PostMapping(name = "查询报表配置分页列表", value = "/webservice/reportRecord/queryReportRecordPage")
    public Result<Page<OdsReportRecordVo>> queryReportRecordPage(@RequestBody PageQuery<OdsReportRecordQo> pageQuery) {
        Page<OdsReportRecordVo> result = odsReportRecordLogic.queryReportRecordPage(pageQuery);
        return R.result(result);
    }

    //**
    // * 根据ID查询报表配置
    // *
    // * @return Result
    // */
    //@GetMapping(name = "根据ID查询报表配置", value = "/webservice/reportRecord/downloadReport")
    //public Result<OdsReportSettingVo> downloadReport(@RequestParam @NotBlank(message = "报表配置ID不能为空") String id) {
    //    OdsReportSettingVo result = odsReportRecordLogic.q(id);
    //    return R.result(result);
    //}

}
